#include <iostream>
#include <string>
#include <jsoncpp/json/json.h>
#define SEP "\r\n"
int main()
{
    int a = 10;
    int b = 20;
    char c = '+';

    Json::Value root;
    root["aa"] = a;
    root["bb"] = b;
    root["op"] = c;

    /* Json::Value sub;
    sub["other"] = 200;
    sub["other1"] = "hello";

    root["sub"] = sub; */

    Json::StyledWriter writer;
    // Json::FastWriter writer;
    std::string s = writer.write(root);
    //std::cout << s << std::endl;
    //std::cout<<s.size()<<std::endl;
    std::string str=std::to_string(s.size());
    str+=SEP;
    str+=s;
    str+=SEP;
    std::cout<<str<<std::endl;



}